Predator Prey simulation



 

Final Report




Predator-Prey Simulation
Category A
New Mexico High School
Supercomputing Challenge
Final Report
April 4, 2001


Team Number 053
Picacho Middle School


Team Members:
Brendan Sullivan
Sean Turner


Teacher:
Jean McCray
Project:
Simulation Model


Table of Contents


Executive Summary 3
Introduction 7
Description 8
Results 11
Conclusion 13
Recommendations 13
Acknowledgments 13
References 14


Executive Summary


Since predators have long since been around, we decided to base our supercomputer challenge project on the most common species of predators around the terrain which we live, the desert southwest. The animals that live in this rugged terrain are well equi pped with what they need to survive especially enough food. Since our predator and prey populations rely on each other, we based our research on the most common animals we see as a predator and its favorite food. These animals are the coyote (predator) and the rabbit (prey). We selected the predator-prey project as a way to determine the relationship between different types of animals and also to determine if this relationship has any impact on whether an animal becomes extinct. We were also interested to see how long someth ing can go without food if it had to, which is similar to how predators and prey are dependent on each other. A predator is an animal that survives by killing and eating other animals. The ability for a predator to capture enough prey animals will determine how long a predator will survive. Since it is hard to capture prey, predators have had to evolve and adap t in order to live through hard time and basically survive. All living things are destined to die and be recycled as a part of the flow of energy through the live community. Which is to say, a creature must feed, and sooner or later, it will be fed upon. Durward L. Allen (1979) In order to determine the relationship between coyotes and rabbits, we first had to do background research on predators and prey. We divided the research into several areas such as Internet web searches, reference books, and discussions with our mentors and state government agencies. Our team contacted the New Mexico Department of Game and Fish to find out information about coyote and rabbit populations, their general eating habits, and their survival skills. They were not able to give us very much information because coyotes and rab bits are not considered game animals. Some of the information that we did find out was the typical diet for a coyote, which was 33% rabbits. Since we were studying about predators and prey, we decided to contact the Department of Fisheries and Wildlife at New Mexico State University. We were very excited when we were able to get in touch with Professor Mark Anderson, who gave us a lot of info rmation on coyotes and predator-prey relationships. After talking with Professor Anderson, he also agreed to be one of our mentors for this project. We met with Professor Anderson at Picacho Middle School at different times during the past several month s. He talked to us about predator and prey populations, the purpose of developing computer models and how to use math equations to simulate a predator-prey relationship. After meeting with our mentors several times and finishing our background research, we began to write our predator-prey simulation model. Since Professor Alt was so helpful to us in trying to learn Java, we decided to use Java as our programming language . In order to make our model work, we had to determine what variables we were going to use in our model. We had to rely on our background research to determine what we felt was important. We identified the two major variables to be birth and death rate s. The reason we chose these two variables is because they are the basic steps in life. We had to develop different math equations that represented the variables we selected. An example of one of the math equations we used was if (num_coyotes > 0) num_rabbits = num_rabbits - (num_coyotes * .02/365) This equation says that if the number of coyotes are greater than zero, then calculate the number of rabbits left after some were eaten by coyotes. The fraction was used to determine the yearly rate of rabbits eaten per coyote based on 2% per year. We e xpected to see an increase in the number of rabbits eaten when the number coyotes increased. However, we had to wait until we ran the model to see if we were right. While we were writing our program, we also tried to compare our model with simulation code written by someone else. We tried using Vensim and Star Logo but we had problems trying to compare them with the same thing we were modeling in our Java program. The Vensim and Star Logo were much more difficult and used more variables. We liked starting to learn these programs but it was hard to compare them to ours because ours is very basic. The results of our program were very similar to what we had predicted. We started out with 50 coyotes and 200 rabbits and after one year, we had 49.9 coyotes and 199 rabbits. These results also supported our background research, which said that a decrea se in either the predator or prey would cause the other to decrease as well. This is because they are dependent on each other. Our model simulated this dependency very well based on the variables we selected. By developing this model, we learned how reliant the predators and prey are on each other. The program that we created was very simple but it showed many complex variables that you can easily see are important. While writing this program we gained a bet ter understanding of how to use Java and we also improved our ability to do research. In conclusion, we created a somewhat simple computer program that would take variables and calculate them. When we started, we predicted that the population would not change much in the long run and we were right. The reason is because when one goes down the other goes down. Our model and our background research supported our predication that they are dependant on each other.



Predator-Prey Simulation



Introduction


Since predators have long since been around, we decided to base our project on the most common species around the terrain, which we live, the desert southwest. The animals that live in this rugged terrain are well equipped with what they need to survive especially enough food. Since our predator and prey populations rely on each other, we based our research on the most common animals we see as a predator and its favorite food. These animals are the coyote (predator) and the rabbit (prey). We selected the predator-prey project as a way to determine the relationship between different types of animals and also to determine if this relationship has any impact on whether an animal becomes extinct. We were also interested to see how long someth ing can go without food if it had to, which is similar to how predators and prey rely on each other. A predator is an animal that survives by killing and eating other animals. The ability for a predator to capture enough prey animals will determine how long a predator will survive. Since it is hard to capture prey, predators have had to evolve and adap t in order to live through hard time and basically survive. All living things are destined to die and be recycled as a part of the flow of energy through the live community. Which is to say, a creature must feed, and sooner or later, it will be fed upon. Durward L. Allen (1979) Description In order to determine the relationship between coyotes and rabbits, we first had to do background research on predators and prey. We divided the research into several areas such as Internet web searches, reference books, and discussions with our mentors and state government agencies. Some of our team members contacted the New Mexico Department of Game and Fish to find out information about coyote and rabbit populations, their general eating habits, and their survival skills. They were not able to give us very much information because coyotes and rabbits are not considered game animals. Some of the information that we did find out was the typical diet for a coyote as shown in Figure 1. Click here to view Figure 1.

Since we were studying about predators and prey, we decided to contact the Department of Fisheries and Wildlife at New Mexico State University. We were very excited when we were able to get in touch with Professor Mark Anderson, who gave us a lot of info rmation on coyotes and predator-prey relationships. After talking with Professor Anderson, he also agreed to be one of our mentors for this project. We met with Professor Anderson at Picacho Middle School at different times during the past several month s. He talked to us about predator and prey populations, the purpose of developing computer models and how to use math equations to simulate a predator-prey relationship. During the regional Supercomputing workshop at New Mexico State University, we met Dan Tappin and Professor Kerry Alt who also offered to be mentors for our team project. Some of our team members met with Dan Tappin at the University, and he worked with us on different math equations that could be used in either C+ or Java computer models. The same team members then met with Professor Kerry Alt, who teaches business computer programming in the Business College. Professor Alt showed us how to begin to w rite a program using Java. He used general examples to show us how we could go about creating our own program. He also showed us how to compile the program into byte code. Professor Alt met with us several times and was also very helpful through email. After meeting with our mentors several times and finishing our background research, we began to write our predator-prey simulation model. Since Professor Alt was so helpful to us in trying to learn Java, we decided to use Java as our programming language . In order to make our model work, we had to determine what variables we were going to use in our model. We had to rely on our background research to determine what we felt was important. We identified the two major variables to be birth and death rat es. The reason we chose these two variables is because they are the basic steps in life. Table 1 shows the information that we chose.
Table 1. Birth and Death rate information
Initial Number of coyotes 50
Initial Number of rabbits 200
Number of days 365
Yearly percent of coyotes that died 10%
Yearly percent of rabbits that died naturally 5%
Yearly birth rate of rabbits 7%
Yearly rate of rabbits eaten per coyote 2%
Yearly rate of coyote starvation per rabbit (i.e. absence of) 15%
Writing the program in Java took a lot of time. We had to learn how to use brackets and why they are important to the program, how to include the math equations into the model, how to code for printing, and how to use "if" statements. The math equations that Dan Tappin helped us with were very useful. An example of one of the math equations we used was if (num_coyotes > 0)
num_rabbits = num_rabbits - (num_coyotes * .02/365)

This equation says that if the number of coyotes are greater than zero, then calculate the number of rabbits after some were eaten by coyotes. The fraction was used to determine the yearly rate of rabbits eaten per coyote based on 2% per year. We expect ed to see an increase in the number of rabbits eaten when the number coyotes increased. However, we had to wait until we ran the model to see if we were right. We spent a lot of time trying to fix errors that were caused by problems in our program. These errors were shown when we compiled our program. Some of the error messages were caused because we forgot to include a semi-colon or close a bracket. We were also able to get some help from Dr. Esther Steiner in the Computer Science Department at New Mexico State University in figuring out an error message that kept us from running our program. With her help we were able to solve the problem and run our prog ram. We were very glad that when it ran, it gave us results that were close to what our original predication was. While we were writing our program, we also tried to compare our model with simulation code written by someone else. We tried using Vensim and Star Logo but we had problems trying to compare them with the same thing we were modeling in our Java program. The Vensim and Star Logo were much more difficult and used more variables. We liked starting to learn these programs but it was hard to compare them to ours because ours is very basic.

Results

The results of our program were very similar to what we had predicted. We started out with 50 coyotes and 200 rabbits and after one year, we had 49.9 coyotes and 199 rabbits. These results also supported our background research, which said that a decrea se in either the predator or prey would cause the other to decrease as well. This is because they are dependent on each other. Our model simulated this dependency very well as seen in Table 2, which shows the results on Day 365. The complete results ar e found in Appendix 2. Table 2. Last Day Day 365
Number of coyotes 49.89925021759693
Number of rabbits (dead after natural causes) 199.02355265612755
Number of rabbits (after birth) 199.02374443694947
Number of rabbits (after eaten) 199.0237444364947
Number of coyotes (after starvation) 49.89924815269482
By developing this model, we learned how reliant the predators and prey are on each other. The program that we created was very simple but it showed many complex variables that you can easily see are important. While writing this program we gained a bet ter understanding of how to use Java and we also improved our ability to do research. At the beginning of our project we researched our topic, which proved to be important in selecting our variables. Throughout the time that we have been working on our project, we feel that we have a better handle on understanding the dependency of the rel ationship between predators and their prey. Around the interim project deadline, we became more determined and focused and were able to use the information that the judges gave us so that we could improve our project. We began experimenting with what wo uld work with what information we had. Soon we met Dan Tappan, who helped us create the math equations that we used in writing our program, and can be viewed in Appendix 1. Conclusion In conclusion, we created a somewhat simple computer program that would take variables and calculate them. When we started, we predicted that the population would not change much in the long run and we were right. The reason is because when one goes down the other goes down. Our model and our background research supported our predication that they are dependant on each other.

Recommendations

We were unable to use various modeling programming because what we were trying to accomplish was very different from what the modeling program would do. In order to figure the relationship between the Predator and Prey, we decided to make our own program to simulate the relationship based on the variables that we thought were important. We would recommend to other teams that they develop their own programs instead of spending a lot of time trying to find one that they can change to fit their project. This will save them a lot of time that can be used to write their own.

Acknowledgments

During this time we would like to thank our mentors Dr. Kerry Alt, Dr. Mark Anderson, and Mr. Dan Tappan. Dr. Alt helped us start programming in Java and we greatly appreciate it. Dr. Anderson kept us focusing on the importance of our project and why we should complete it. We couldn't have completed it without Mr. Tappan's assistance in helping us create our math equations for the final program. Last but not least our supportive teacher Ms. McCray. So thank you all very much and we couldn't have done it without you.

References

1. Desert USA. Com
2. Wildlife Ecology and management
3. Deep Ethnology
4. Nature. Com
5. The coyote
6. The Predator Prey game
7. Predator Prey models
8. Wildlife and Terrestrial Resources
9. Dr. Kerry Alt Department of Accounting and Business Computer Systems kalt@nmsu.edu
10. Max Saad Senior member of Technical Staff Environmental Services, Neutron Generator Facility mpsaad@sandia.gov
11. Linda Ann Riley Industrial engineering linriley@nmsu.edu
12. Dan Tappan dtappan@crl.nmsu.edu
13. Dr. Mark C. Anderson College of Agriculture and Home Economics manderse@nmsu.edu
14. Dr. Esther Steiner University Computer Science Telephone interview 646-2096

For More Information E-mail Us At:

Predator Prey simulation